@props(['name', 'module', 'items'])
<div module id="index10">
    <div class="wp">
        <div class="index_title4 fadeInUp animated wow animated">
            <div class="left">
                <h4>{{ $name }}</h4>
                <!-- <span>PRODUCT CENTER</span> -->
            </div>

            @if(count($items))
            <div class="right">
                @foreach($items as $nav)
                <a data-tab="item-{{ $nav->id }}" href="javascript:void({{ $nav->id }})">{{ $nav->title }}</a>
                @endforeach
                <a href="/content/{{ $module->id }}">查看更多 &gt;</a>
            </div>
            @endif
        </div>

        <div class="index10_list" id="item-0">
            @foreach($module->articles as $item)
            <div class="item fadeInUp animated wow">
                <a href="/article/{{ $item->id }}">
                    <div class="con">
                        <div class="pic">
                            @if (!empty($item->image))
                            <div class="img"
                                @if (!empty($item->image))
                                style="background-image: url({{$item->image}});"
                                @else style="border: 1px solid #ccc;"
                                @endif>
                            </div>
                            @endif
                        </div>
                        <div class="text">
                            <h4>{{ $item->title }}</h4>
                            <p>{{ $item->desc }}</p>
                        </div>
                    </div>
                </a>
            </div>
            @endforeach
        </div>

        @if (count($items))
        @foreach($items as $nav)
        <div class="index10_list" id="item-{{ $nav->id }}" style="display: none;">
            @foreach($nav->items as $item)
            @if ($loop->index < 6)
                <div class="item fadeInUp animated wow">
                <a href="/article/{{ $item->id }}">
                    <div class="con">
                        <div class="pic">
                            @if (!empty($item->image))
                            <div class="img"
                                @if (!empty($item->image))
                                style="background-image: url({{$item->image}});"
                                @else style="border: 1px solid #ccc;"
                                @endif>
                            </div>
                            @endif
                        </div>
                        <div class="text">
                            <h4>{{ $item->title }}</h4>
                            <p>{{ $item->desc }}</p>
                        </div>
                    </div>
                </a>
        </div>
        @endif
        @endforeach
    </div>
    @endforeach

    @else

    <div class="index10_list">
        @foreach($module->articles as $item)
        @if ($loop->index < 6)
            <div class="item fadeInUp animated wow">
            <a href="/article/{{ $item->id }}">
                <div class="con">
                    <div class="pic">
                        @if (!empty($item->image))
                        <div class="img"
                            @if (!empty($item->image))
                            style="background-image: url({{$item->image}});"
                            @else style="border: 1px solid #ccc;"
                            @endif>
                        </div>
                        @endif
                    </div>
                    <div class="text">
                        <h4>{{ $item->title }}</h4>
                        <p>{{ $item->desc }}</p>
                    </div>
                </div>
            </a>
    </div>
    @endif
    @endforeach
</div>

@endif
</div>
</div>
